var __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (t, i) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, t) {
              e.__proto__ = t;
            }) ||
          function (e, t) {
            for (var i in t)
              Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
          })(t, i);
      };
      return function (t, i) {
        function l() {
          this.constructor = t;
        }
        if ("function" != typeof i && null !== i)
          throw new TypeError(
            "Class extends value " + String(i) + " is not a constructor or null"
          );
        e(t, i),
          (t.prototype =
            null === i
              ? Object.create(i)
              : ((l.prototype = i.prototype), new l()));
      };
    })(),
  SkillDescribeView = (function (e) {
    function t() {
      var t = e.call(this) || this;
      return (
        t.tab_skillDesc.on(Laya.Event.CLICK, t, t.onTabSkillDidAction),
        t.btn_skillDesc_back.on(Laya.Event.CLICK, t, t.onDidSkillDescBack),
        (t.list_skill_desc.vScrollBarSkin = ""),
        (t.list_skill_desc.renderHandler = new Handler(
          t,
          t.updateCellRenderHandler
        )),
        t
      );
    }
    return (
      __extends(t, e),
      (t.showSkillDescView = function () {
        return (
          null == this.skillDescV && (this.skillDescV = new t()),
          this.skillDescV.getData("wushi"),
          (this.skillDescV.tab_skillDesc.selectedIndex = 0),
          this.skillDescV
        );
      }),
      (t.prototype.getData = function (e) {
        var t,
          i = [],
          l = [];
        "wushi" == e
          ? (l = Dictionary.wushiSkillDesc)
          : "wenren" == e
          ? (l = Dictionary.wenrenSkillDesc)
          : "yishi" == e && (l = Dictionary.yishiSkillDesc);
        for (var n = 0; n < l.length; n++) {
          var s = l[n];
          (t = {
            label_skill_name: { text: s.name },
            label_skill_desc: { text: s.desc },
          }),
            i.push(t);
        }
        this.list_skill_desc.dataSource = i;
      }),
      (t.prototype.updateCellRenderHandler = function (e, t) {
        e.dataSource.label_skill_name;
      }),
      (t.prototype.onTabSkillDidAction = function (e) {
        "item0" == e.target.name
          ? this.getData("wushi")
          : "item1" == e.target.name
          ? this.getData("wenren")
          : "item2" == e.target.name && this.getData("yishi"),
          this.list_skill_desc.scrollTo(0);
      }),
      (t.prototype.onDidSkillDescBack = function () {
        this.removeSelf();
      }),
      t
    );
  })(ui.UserInfoController.SkillDescribeViewUI);
